package filedemo;

public class MainDemo {
    public static void main(String[] args) {
        try {
            java.io.File file = null;
            java.io.File dir = new java.io.File("C:/");
            file = java.io.File.createTempFile("JavaTemp", ".javatemp", dir);
            System.out.println(file.getPath());
//            file.deleteOnExit();
        } catch (java.io.IOException e) {
            throw new RuntimeException(e);
        }
    }
}
